package com.beijingBorderCheck.service;

public class WriteData {

	//定义数据库驱动
	public static final String DRIVER_STRING = "com.mysql.cj.jdbc.Driver";
	//定义数据库链接
	public static final String URL_STRING = "jdbc:mysql://localhost:3306/checkData";
	//定义数据用户名
	public static final String NAME_STRING = "root";
	//定义数据库密码
	public static final String PASSWD_STRING = "tiger";
	//定义卡片类型
	public static final String CARDTYPE_STRING1 = "";
	public static final String CARDTYPE_STRING2 = "";
	//初始化
	static {
		try {
			Class.forName(DRIVER_STRING);
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public static void writeDatas(String dataString) {
		if (!dataString.equals("")) {
			//截取
			String[] arr = dataString.split("^");
			//首先获取卡片类型
			String cardType = arr[0];
			if (cardType.equals(CARDTYPE_STRING1)) {
				
			}else if (cardType.equals(CARDTYPE_STRING2)) {
				
			}
		}
	}
}
